import time

def computer_runtime(func):
    def infunc():
        starttime = time.time()
        func()
        endtime = time.time()
        print("{}函数运行时间是{}".format(func.__name__,endtime - starttime))
    return infunc

@computer_runtime
def run():
    time.sleep(6)
    l = [x ** 2 for x in range(888888)]

run()